package com.example.lambda;

import java.util.stream.Stream;

/**
 * @Author: 朝花不迟暮
 * @Description: allMatch 检查流是否所有都满足给定谓词的元素
 * @Date: 2022/11/4
 */
public class AllMatchSample {

    public static void main(String[] args) {
        boolean match = Stream.of("A", "B", "C", "D").allMatch(s -> s.contains("C"));
        System.out.println("match = " + match);
    }
}
